
package swb.api.com.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import swb.api.com.repository.dto.WithdrawRecord;

import java.util.Optional;

@Repository
public interface WithdrawRecordRepository extends JpaRepository<WithdrawRecord, Long> {
    Page<WithdrawRecord> findByUserId(Long userId, Pageable pageable);
    Page<WithdrawRecord> findByUserIdAndStatus(Long userId, Integer status, Pageable pageable);
    Optional<WithdrawRecord> findByOutTradeNo(String outTradeNo);
    Page<WithdrawRecord> findByStatus(Integer status, Pageable pageable);
}